package com.pxye.controller;

import java.util.Date;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pxye.entity.User;

/**
 * @Title: HelloController
 * @Mail: yepx2013@gmail.com
 * @Author: Yepx
 * @Description: 等价于@Controller 和 @RequstBody
 */
@RestController
public class HelloController {
  
	
	/**
	 * Spring Boot 默认使用的json解析框架是jackon
	 * @return
	 */
	@RequestMapping("/getUser")
	public User getUser(){
		
		User user = new User();
		user.setId(1);
		user.setName("张三");
		user.setDate(new Date());
		
		return user;
	}
}
